<?php
$this->placeholder("navegacion")->set($this->navegacion($this->nav));

$domConfig = Zend_Registry::get('domConfig');
$perfil = App_Perfil::getInstance();
$perfil->cargar("VARIABLES");

$periodicidad = $this->indicador[0]["periodicidad"];

?>
<br/>
<table width="100%" align="center" class="iceDatTbl">
<tr>
	<th>Indicador</th>
	<th>Periodicidad</th>
	<th>Unidad</th>
</tr>
 <TR class="iceDatTblRow1">
   <TD style="text-align:center;"><?php echo $this->indicador[0]["nombreindicador"];?></TD>
   <TD style="text-align:center;"><?php echo $domConfig->PERIODICIDAD->$periodicidad;?></TD>
   <TD style="text-align:center;"><?php echo $this->indicador[0]["nombreunidad"];?></TD>
 </TR>
</table>
<br/>
<BR></BR>
<?php
if ($perfil->crear()){
?>
<!--<div align="right" class="buttons">-->
<!--  <a class="btn btn-primary" href="< ?php echo $this->baseUrl("/variables/index/crearvariable");?>">-->
<!--  <span class="glyphicon glyphicon-plus-sign"></span> Crear Variable</a>-->
<!--</div>-->
<?php }
if(count($this->datos)>0):?>
<table id="table_id" align="center" class="display">
  <thead>
    <tr>
      <th width="40%">Actualiz&oacute;</th>
      <th width="20%">Valores</th>
      <th width="20%">Fecha</th>
      <th width="20%">Comentarios</th>
    </tr>
  </thead>
  <tbody>
	<?php foreach ($this->datos as $key => $value):?>
    <tr>
      <td><?php echo $value["nombreusuario"];?></td>
      <td><?php echo $value["valornum"];?></td>
      <td><?php echo $value["fechaactualiza"];?></td>
      <td><?php echo $value["comentario"];?></td>
    </tr>
  <?php  endforeach;?>
  </tbody>
</table>

<script type="text/javascript">
 $(function() {
	$('#table_id').dataTable({
		"bJQueryUI": true,
		"bAutoWidth": false,
 		"sPaginationType": "full_numbers",
 		"bStateSave": true,
 		"aoColumns": [
 	 		 			{ "sType": "numeric" },
 	 		 			null,
 	 		 			null,
 	 		 			null
 	 		 		 ]
 	 		  		
	});

});
</script>
<?php else:?>
<br/>
<?php echo $this->mensajes("No existen registros");?>
<?php endif;?>
